package org.publiccms.mybatis.entity;

import java.io.Serializable;

public class CmsCategory implements Serializable {
    private Integer id;

    private Integer siteId;

    private String name;

    private Integer parentId;

    private Integer typeId;

    private String code;

    private String templatePath;

    private String path;

    private Boolean onlyUrl;

    private Boolean hasStatic;

    private String url;

    private String contentPath;

    private Boolean containChild;

    private Integer pageSize;

    private Boolean allowContribute;

    private Integer sort;

    private Boolean hidden;

    private Boolean disabled;

    private Integer contents;

    private Integer extendId;

    private String childIds;

    private String tagTypeIds;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getSiteId() {
        return siteId;
    }

    public void setSiteId(Integer siteId) {
        this.siteId = siteId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public Integer getTypeId() {
        return typeId;
    }

    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code == null ? null : code.trim();
    }

    public String getTemplatePath() {
        return templatePath;
    }

    public void setTemplatePath(String templatePath) {
        this.templatePath = templatePath == null ? null : templatePath.trim();
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path == null ? null : path.trim();
    }

    public Boolean getOnlyUrl() {
        return onlyUrl;
    }

    public void setOnlyUrl(Boolean onlyUrl) {
        this.onlyUrl = onlyUrl;
    }

    public Boolean getHasStatic() {
        return hasStatic;
    }

    public void setHasStatic(Boolean hasStatic) {
        this.hasStatic = hasStatic;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url == null ? null : url.trim();
    }

    public String getContentPath() {
        return contentPath;
    }

    public void setContentPath(String contentPath) {
        this.contentPath = contentPath == null ? null : contentPath.trim();
    }

    public Boolean getContainChild() {
        return containChild;
    }

    public void setContainChild(Boolean containChild) {
        this.containChild = containChild;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Boolean getAllowContribute() {
        return allowContribute;
    }

    public void setAllowContribute(Boolean allowContribute) {
        this.allowContribute = allowContribute;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Boolean getHidden() {
        return hidden;
    }

    public void setHidden(Boolean hidden) {
        this.hidden = hidden;
    }

    public Boolean getDisabled() {
        return disabled;
    }

    public void setDisabled(Boolean disabled) {
        this.disabled = disabled;
    }

    public Integer getContents() {
        return contents;
    }

    public void setContents(Integer contents) {
        this.contents = contents;
    }

    public Integer getExtendId() {
        return extendId;
    }

    public void setExtendId(Integer extendId) {
        this.extendId = extendId;
    }

    public String getChildIds() {
        return childIds;
    }

    public void setChildIds(String childIds) {
        this.childIds = childIds == null ? null : childIds.trim();
    }

    public String getTagTypeIds() {
        return tagTypeIds;
    }

    public void setTagTypeIds(String tagTypeIds) {
        this.tagTypeIds = tagTypeIds == null ? null : tagTypeIds.trim();
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", siteId=").append(siteId);
        sb.append(", name=").append(name);
        sb.append(", parentId=").append(parentId);
        sb.append(", typeId=").append(typeId);
        sb.append(", code=").append(code);
        sb.append(", templatePath=").append(templatePath);
        sb.append(", path=").append(path);
        sb.append(", onlyUrl=").append(onlyUrl);
        sb.append(", hasStatic=").append(hasStatic);
        sb.append(", url=").append(url);
        sb.append(", contentPath=").append(contentPath);
        sb.append(", containChild=").append(containChild);
        sb.append(", pageSize=").append(pageSize);
        sb.append(", allowContribute=").append(allowContribute);
        sb.append(", sort=").append(sort);
        sb.append(", hidden=").append(hidden);
        sb.append(", disabled=").append(disabled);
        sb.append(", contents=").append(contents);
        sb.append(", extendId=").append(extendId);
        sb.append(", childIds=").append(childIds);
        sb.append(", tagTypeIds=").append(tagTypeIds);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CmsCategory other = (CmsCategory) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getSiteId() == null ? other.getSiteId() == null : this.getSiteId().equals(other.getSiteId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId()))
            && (this.getTypeId() == null ? other.getTypeId() == null : this.getTypeId().equals(other.getTypeId()))
            && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
            && (this.getTemplatePath() == null ? other.getTemplatePath() == null : this.getTemplatePath().equals(other.getTemplatePath()))
            && (this.getPath() == null ? other.getPath() == null : this.getPath().equals(other.getPath()))
            && (this.getOnlyUrl() == null ? other.getOnlyUrl() == null : this.getOnlyUrl().equals(other.getOnlyUrl()))
            && (this.getHasStatic() == null ? other.getHasStatic() == null : this.getHasStatic().equals(other.getHasStatic()))
            && (this.getUrl() == null ? other.getUrl() == null : this.getUrl().equals(other.getUrl()))
            && (this.getContentPath() == null ? other.getContentPath() == null : this.getContentPath().equals(other.getContentPath()))
            && (this.getContainChild() == null ? other.getContainChild() == null : this.getContainChild().equals(other.getContainChild()))
            && (this.getPageSize() == null ? other.getPageSize() == null : this.getPageSize().equals(other.getPageSize()))
            && (this.getAllowContribute() == null ? other.getAllowContribute() == null : this.getAllowContribute().equals(other.getAllowContribute()))
            && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
            && (this.getHidden() == null ? other.getHidden() == null : this.getHidden().equals(other.getHidden()))
            && (this.getDisabled() == null ? other.getDisabled() == null : this.getDisabled().equals(other.getDisabled()))
            && (this.getContents() == null ? other.getContents() == null : this.getContents().equals(other.getContents()))
            && (this.getExtendId() == null ? other.getExtendId() == null : this.getExtendId().equals(other.getExtendId()))
            && (this.getChildIds() == null ? other.getChildIds() == null : this.getChildIds().equals(other.getChildIds()))
            && (this.getTagTypeIds() == null ? other.getTagTypeIds() == null : this.getTagTypeIds().equals(other.getTagTypeIds()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getSiteId() == null) ? 0 : getSiteId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode());
        result = prime * result + ((getTypeId() == null) ? 0 : getTypeId().hashCode());
        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
        result = prime * result + ((getTemplatePath() == null) ? 0 : getTemplatePath().hashCode());
        result = prime * result + ((getPath() == null) ? 0 : getPath().hashCode());
        result = prime * result + ((getOnlyUrl() == null) ? 0 : getOnlyUrl().hashCode());
        result = prime * result + ((getHasStatic() == null) ? 0 : getHasStatic().hashCode());
        result = prime * result + ((getUrl() == null) ? 0 : getUrl().hashCode());
        result = prime * result + ((getContentPath() == null) ? 0 : getContentPath().hashCode());
        result = prime * result + ((getContainChild() == null) ? 0 : getContainChild().hashCode());
        result = prime * result + ((getPageSize() == null) ? 0 : getPageSize().hashCode());
        result = prime * result + ((getAllowContribute() == null) ? 0 : getAllowContribute().hashCode());
        result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
        result = prime * result + ((getHidden() == null) ? 0 : getHidden().hashCode());
        result = prime * result + ((getDisabled() == null) ? 0 : getDisabled().hashCode());
        result = prime * result + ((getContents() == null) ? 0 : getContents().hashCode());
        result = prime * result + ((getExtendId() == null) ? 0 : getExtendId().hashCode());
        result = prime * result + ((getChildIds() == null) ? 0 : getChildIds().hashCode());
        result = prime * result + ((getTagTypeIds() == null) ? 0 : getTagTypeIds().hashCode());
        return result;
    }
}